#ifndef __IMAGESENDER_H
#define __IMAGESENDER_H

#include <QObject>
#include <QUdpSocket>
#include <QImage>
#include <QBuffer>
#include <QDataStream>

class ImageSender : public QObject
{
    Q_OBJECT

public:
    ImageSender(QObject *parent = nullptr)
        : QObject(parent), udpSocket(new QUdpSocket(this)) {}

    void sendImage(const QImage &image, const QString &address, quint16 port);

private:
    QUdpSocket *udpSocket;
};








#endif
